package cn.seecoder.ai.model.vo;

import cn.seecoder.ai.enums.DeploymentStateEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Comment;

import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author fanyanpeng
 * @date 2023/4/11 23:09
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class DeploymentVO {

    
    private Integer id;

    @NotNull(message = "部署需要指定用户id")
    private Integer userId;

    @NotNull(message = "部署需要指定模型id")
    private Integer modelId;

    @NotEmpty(message = "部署名称不为空")
    private String deploymentName;

    private String deploymentUrl;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private DeploymentStateEnum deploymentState;

    @ApiModelProperty(name = "部署开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createdTime;

    @ApiModelProperty(name = "部署完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date finishTime;

}
